﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "GcmpModelInterface.h"
#include "IEventArgs.h"
#include "ElementId.h"


namespace gcmp
{
    class IDocument;


    /// \brief 图纸事件类型
    ///
    /// 
    enum class DrawingLayoutEventType : int32_t
    {
        Created,        ///< 图纸创建
        PreDeletion     ///< 图纸预删除
    };


    /// \brief  图纸事件参数
    ///
    class GCMP_MODEL_INTERFACE_EXPORT IDrawingLayoutEventArgs : public IEventArgs
    {
        DEFINE_CAST_DERIVED(gcmp::IDrawingLayoutEventArgs, gcmp::IEventArgs)
    public:
        ///  \brief 获取图纸事件类型
        ///
        /// \return 图纸事件类型
        virtual DrawingLayoutEventType GetType() const = 0;

        ///  \brief 获取图纸事件对应的文档
        ///
        /// \return 文档指针
        virtual IDocument* GetDocument() const = 0;

        ///  \brief 获取图纸事件中对应的图纸ElementId
        ///
        /// \return 图纸ElementId
        virtual ElementId GetLayoutId() const = 0;

    };
}
